﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Resources;
using System.Text;
using System.Threading.Tasks;

namespace LightOMator.Helper
{
    public static class GlobalizationHelper
    {
        private static ResourceManager _resourceLoader = LightOMator.Resources.AppResources.ResourceManager;

        public static string Localize(string resourceName, params object[] parameters)
        {
            string translation = _resourceLoader.GetString(resourceName);
            if (parameters != null && translation != null)
            {
                translation = string.Format(translation, parameters);
            }
            return translation;
        }

    }
}
